A conventional nail gun such as disclosed in Taiwanese Patent No. 537127 or Taiwanese Patent No. 520691 usually includes a housing body, a safety member movably mounted to the housing body, a valve rod mounted to the housing body and controlling airflow in the nail gun for firing a nail, and a switch device mounted to the housing body and close to the valve rod for switching the nail gun between a single shot mode and a continuous shooting mode.